package com.syp.uuid.core.scheduled;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import com.syp.uuid.core.service.SerialServiceI;

@Component
public class SerialFlushScheduled {

	private static final String CRON_EVERY_5_MINUTES = "0/5 * * * * ?";

	@Autowired
	private SerialServiceI serialService;

	//@Scheduled(cron = CRON_EVERY_5_MINUTES)
	public void task() {
		long rest = this.serialService.getSequenceRestLength("appseq.TEST_SEQ");
		System.err.println(rest);
		this.serialService.put("appseq.TEST_SEQ", 100);
	}

}
